package edu.sctu.xiangkun.day201506.day20150603.Textone;

import java.util.Scanner;

/**
 * Created by lenovo on 2015/6/3.
 */
public class DemoOne {
    public void exception(){
        try{
            System.out.println("请输入第一个数：");
            Scanner input  = new Scanner(System.in);
             int a = input.nextInt();
            System.out.println("请输入第二个数：");
            int b  = input.nextInt();
            int result = a/b;
        }catch(Exception e){
            e.printStackTrace();
            System.out.println("请注意除数不能为零");
        }
    }
}
